@@ -1,15 +0,0 @@ |
||
1 |
-# Contacts are used only for the contact form on the Huginn website. If you host a public Huginn instance, you can use |
|
2 |
-# these to receive messages from visitors. |
|
3 |
- |
|
4 |
-class Contact < ActiveRecord::Base |
|
5 |
- attr_accessible :email, :message, :name |
|
6 |
- |
|
7 |
- validates_format_of :email, :with => /\A[A-Z0-9._%+-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\Z/i |
|
8 |
- validates_presence_of :name, :message |
|
9 |
- |
|
10 |
- after_create :send_contact |
|
11 |
- |
|
12 |
- def send_contact |
|
13 |
- ContactMailer.send_contact(self).deliver |
|
14 |
- end |
|
15 |
-end |
@@ -3,7 +3,6 @@ class SetCharsetForMysql < ActiveRecord::Migration |
||
3 | 3 |
@all_models ||= [ |
4 | 4 |
Agent, |
5 | 5 |
AgentLog, |
6 |
- Contact, |
|
7 | 6 |
Event, |
8 | 7 |
Link, |
9 | 8 |
Scenario, |
@@ -23,7 +22,6 @@ class SetCharsetForMysql < ActiveRecord::Migration |
||
23 | 22 |
all_models.each { |model| |
24 | 23 |
table_name = model.table_name |
25 | 24 |
|
26 |
- # `contacts` may not exist |
|
27 | 25 |
next unless connection.table_exists? table_name |
28 | 26 |
|
29 | 27 |
model.columns.each { |column| |